home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / comm / bbs / cit_src_7H21.lha / ansisys.h < prev    next >
C/C++ Source or Header  |  1997-08-19  |  13KB  |  623 lines

  1. /*
  2. * AnsiSys.H
  3. *
  4. * This file contains the prototypes for the interface to the system
  5. * dependencies.  If you need prototypes for some internal system
  6. * dependent code, use SysDep.H.  This file is no longer the domain of
  7. * the system dependent porter.  May 12, 1990.
  8. */
  9. /*
  10. * Use these only if we are ANSI capable...
  11. */
  12. #define ANSI_PROTOTYPING
  13. #ifdef ANSI_PROTOTYPING
  14. /*
  15. * These functions are the interface calls to the system dependencies.
  16. * Since some of these functions can be implemented as parameterized
  17. * defines, you must go through these and comment out those that should
  18. * not be here.
  19. */
  20. char Pause_Message_Check(void);
  21.  
  22. /*
  23. * 3.1. Modem stuff
  24. */
  25. #ifndef ModemOpen
  26. void ModemOpen(char FromDoor);
  27. #endif
  28. #ifndef inp
  29. AN_UNSIGNED inp(void);
  30. #endif
  31. #ifndef MIReady
  32. int MIReady(void);
  33. #endif
  34. #ifndef ModemShutdown
  35. void ModemShutdown(char KillCarr);
  36. #endif
  37. #ifndef outMod
  38. char outMod(int c);
  39. #endif
  40. #ifndef fastMod
  41. char fastMod(int c);
  42. #endif
  43. #ifndef ModemPushBack
  44. void ModemPushBack(int c);
  45. #endif
  46. #ifndef gotCarrier
  47.  int gotCarrier(void);
  48. #endif
  49. #ifndef changeBauds
  50. int changeBauds(MenuId id);
  51. #endif
  52. #ifndef DisableModem
  53. void DisableModem(char FromNet);
  54. #endif
  55. #ifndef EnableModem
  56. void EnableModem(char FromNet);
  57. #endif
  58. #ifndef ReInitModem
  59. void ReInitModem(void);
  60. #endif
  61. #ifndef getNetBaud
  62. char getNetBaud(void);
  63. #endif
  64. #ifndef ResultVal
  65. int  ResultVal(char *buf);
  66. #endif
  67. #ifndef setNetCallBaud
  68. int setNetCallBaud(int targetBaudCode);
  69. #endif
  70. #ifndef HangUp
  71. void HangUp(char FromNet);
  72. #endif
  73. #ifndef BufferingOn
  74. void BufferingOn(void);
  75. #endif
  76. #ifndef BufferingOff
  77. void BufferingOff(void);
  78. #endif
  79. #ifndef Reinitialize
  80. void Reinitialize(void);
  81. #endif
  82. /*
  83. * 3.2. Disk Stuff
  84. */
  85. #ifndef mvToHomeDisk
  86. int mvToHomeDisk(int x);
  87. #endif
  88. #ifndef RoomLeft
  89. long RoomLeft(aRoom *room);
  90. #endif
  91. #ifndef RottenDial
  92. int RottenDial(char *callout_string);
  93. #endif
  94. /*
  95. * 3.3. Console Stuff
  96. */
  97. #ifndef getCh
  98. int getCh(void);
  99. #endif
  100. #ifndef KBReady
  101. char KBReady(void);
  102. #endif
  103. #ifndef mputChar
  104. void mputChar(char c);
  105. #endif
  106. #ifndef simpleGetch
  107. int simpleGetch(void);
  108. #endif
  109. #ifndef ScreenUser
  110. void ScreenUser(void);
  111. #endif
  112. #ifndef ScrNewUser
  113. void ScrNewUser(void);
  114. #endif
  115. #ifndef ScrTimeUpdate
  116. void ScrTimeUpdate(int hr, int mn);
  117. #endif
  118. #ifndef SpecialMessage
  119. void SpecialMessage(char *message);
  120. #endif
  121. #ifndef StopVideo
  122. void StopVideo(void);
  123. #endif
  124. /*
  125. * 3.4. Area Stuff
  126. */
  127. #ifndef CitGetFileList
  128. void CitGetFileList(char *mask, SListBase *base, long before,
  129. long after, char *phrase);
  130. #endif
  131. #ifndef FindDirName
  132. char *FindDirName(int roomno);
  133. #endif
  134. #ifndef getArea
  135. char getArea(aRoom *roomData);
  136. #endif
  137. #ifndef homeSpace
  138. void homeSpace(void);
  139. #endif
  140. #ifndef netGetArea
  141. int netGetArea(char *fn, struct fl_req *file_data, char ambiguous);
  142. #endif
  143. #ifndef netGetAreaV2
  144. int netGetAreaV2(MenuId id, char *fn, struct fl_req *file_data, char ambiguous);
  145. #endif
  146. #ifndef netSetNewArea
  147. char netSetNewArea(NET_AREA *file_data);
  148. #endif
  149. #ifndef printArea
  150. int printArea(ROOM_AREA *x);
  151. #endif
  152. #ifndef prtNetArea
  153. char *prtNetArea(NET_AREA *netArea);
  154. #endif
  155. #ifndef RoomSys
  156. int RoomSys(int roomNo);
  157. #endif
  158. #ifndef setSpace
  159. char setSpace(aRoom *roomData);
  160. #endif
  161. #ifdef OLD_STYLE
  162. #ifndef sysGetSendFiles
  163. char sysGetSendFiles(char *Files, struct fl_send *sendWhat);
  164. #endif
  165. #else
  166. #ifndef sysGetSendFilesV2
  167. char sysGetSendFilesV2(MenuId id, char *name, struct fl_send *sendWhat);
  168. #endif
  169. #endif
  170. #ifndef sysRoomLeft
  171. long sysRoomLeft(void);
  172. #endif
  173. #ifndef sysSendFiles
  174. void sysSendFiles(struct fl_send *sendWhat);
  175. #endif
  176. #ifndef updFiletag
  177. void updFiletag(char *fileName, char *desc);
  178. #endif
  179. #ifndef makeAuditName
  180. void makeAuditName(char *logfn, char *name);
  181. #endif
  182. #ifndef ValidDirFileName
  183. char ValidDirFileName(char *fn);
  184. #endif
  185. #ifndef NormalName
  186. void NormalName(struct fl_send *x, char *y);
  187. #endif
  188. #ifndef RedirectName
  189. void RedirectName(char *buffer, char *directory, char *filename);
  190. #endif
  191. #ifndef MakeDomainDirectory
  192. void MakeDomainDirectory(int dir);
  193. #endif
  194. #ifndef KillDomainDirectory
  195. void KillDomainDirectory(int dir);
  196. #endif
  197. #ifndef MakeDomainFileName
  198. void MakeDomainFileName(char *buffer, int Dir, char *filename);
  199. #endif
  200. #ifndef MoveFile
  201. void MoveFile(char *oldname, char *newname);
  202. #endif
  203. #ifndef CopyFile
  204. char CopyFile(char *oldname, aRoom *roomData);
  205. #endif
  206. #ifndef CopyFileToFile
  207. void CopyFileToFile(char *fn, char *vfn);
  208. #endif
  209. #ifndef VirtualCopyFileToFile
  210. void VirtualCopyFileToFile(char *src, char *target);
  211. #endif
  212. #ifndef ChangeToCacheDir
  213. int ChangeToCacheDir(char *x);
  214. #endif
  215. #ifndef ToTempArea
  216. void ToTempArea(void);
  217. #endif
  218. #ifndef KillTempArea
  219. void KillTempArea(void);
  220. #endif
  221. /*
  222. * 3.5. Baud handling
  223. */
  224. #ifndef Find_baud
  225. char Find_baud(char **whatRate);
  226. #endif
  227.  
  228. #ifndef Set_Timer
  229. unsigned long Set_Timer(unsigned long oldtime);
  230. #endif
  231. #ifndef Compute_Data
  232. void Compute_Data(char *name);
  233. #endif
  234.  
  235. /*
  236. * 3.6. File Stuff
  237. */
  238. #ifndef dirString
  239. void dirString(char *target, ROOM_AREA *area);
  240. #endif
  241. #ifndef makeHelpFileName
  242. void makeHelpFileName(char *new, char *original);
  243. #endif
  244. #ifndef makeSysName
  245. void makeSysName(SYS_FILE target, char *name, SYS_AREA *area);
  246. #endif
  247. #ifndef InitBio
  248. void InitBio(void);
  249. #endif
  250. #ifndef MakeBioName
  251. void MakeBioName(SYS_FILE target, char *name);
  252. #endif
  253. #ifndef MoveToBioDirectory
  254. void MoveToBioDirectory(void);
  255. #endif
  256. #ifndef safeopen
  257. FILE *safeopen(char *fn, char *mode);
  258. #endif
  259. #ifndef totalBytes
  260. void totalBytes(long *size, FILE *fd);
  261. #endif
  262. /*
  263. * 3.7. System Formatting Functions
  264. */
  265. #ifndef mPrintf
  266. int  mPrintf(char *format, ...);
  267. #endif
  268. #ifndef dPrintf
  269. void dPrintf(char *format, ...);
  270. #endif
  271. #ifndef splitF
  272. void splitF(FILE *diskFile, char *format, ...);
  273. #endif
  274. #ifndef mTrPrintf
  275. void mTrPrintf(char *format, ...);
  276. #endif
  277. #ifndef ToFile
  278. void ToFile(char *format, ...);
  279. #endif
  280. /*
  281. * 3.8. Timers
  282. */
  283. #ifndef MilliSecPause
  284. void MilliSecPause(int x);
  285. #endif
  286. #ifndef pause
  287. void pause(int i);
  288. #endif
  289. #ifndef startTimer
  290. void startTimer(int TimerId);
  291. #endif
  292. #ifndef getRawDate
  293. void getRawDate(int *year, int *month, int *day, int *hours, int *minutes,
  294. int *seconds, int *milli);
  295. #endif
  296. #ifndef setRawDate
  297. char setRawDate(int year, int month, int day, int hour, int min);
  298. #endif
  299. #ifndef AbsToReadable
  300. char *AbsToReadable(unsigned long lastdate);
  301. #endif
  302. #ifndef ReadDate
  303. int  ReadDate(char *date, long *RetTime);
  304. #endif
  305. #ifndef CurAbsolute
  306. long CurAbsolute(void);
  307. #endif
  308. #ifndef chkTimeSince
  309. long chkTimeSince(int TimerId);
  310. #endif
  311. /*
  312. * 3.9. Miscellaneous
  313. */
  314. #ifndef copy_struct
  315. void copy_struct(char *src, char *dest);
  316. #endif
  317. #ifndef copy_array
  318. void copy_array(char *src, char *dest);
  319. #endif
  320. #ifndef copy_ptr
  321. void copy_ptr(char *src, char *dest, int s);
  322. #endif
  323. #ifndef CheckSystem
  324. char CheckSystem(void);
  325. #endif
  326. #ifndef giveSpaceLeft
  327. void giveSpaceLeft(aRoom *roomData);
  328. #endif
  329. #ifndef systemCommands
  330. void systemCommands(void);
  331. #endif
  332. #ifndef systemShutdown
  333. void systemShutdown(int SysErrorVal);
  334. #endif
  335. #ifndef OutsideEditor
  336. void OutsideEditor(void);
  337. #endif
  338. #ifndef OtherEditOptions
  339. void OtherEditOptions(char **Options);
  340. #endif
  341. #ifndef ShowOutsideEditors
  342. void ShowOutsideEditors(void);
  343. #endif
  344. #ifndef RunRemoteEditor
  345. void RunRemoteEditor(int s);
  346. #endif
  347. #ifndef receive
  348. int receive(int seconds);
  349. #endif
  350. #ifndef WhatDay
  351. int WhatDay(void);
  352. #endif
  353. #ifndef systemInit
  354. int systemInit(void);
  355. #endif
  356. #ifndef ResIntrp
  357. void *ResIntrp(char *line);
  358. #endif
  359. #ifndef zero_struct
  360. void zero_struct(void *target);
  361. #endif
  362. #ifndef zero_array
  363. void zero_array(char *target);
  364. #endif
  365. #ifndef ClearDoorTimers
  366. void ClearDoorTimers(void);
  367. #endif
  368. #ifndef Cumulate
  369. void Cumulate();
  370. #endif
  371. #ifndef BackFromDoor
  372. char BackFromDoor(void);
  373. #endif
  374. #ifndef doDoor
  375. char doDoor(char moreYet);
  376. #endif
  377. #ifndef DoorHelpListing
  378. void DoorHelpListing(char *target);
  379. #endif
  380. #ifndef NewUserDoor
  381. char NewUserDoor(void);
  382. #endif
  383. #ifndef RunAutoDoor
  384. char RunAutoDoor(int i, char ask);
  385. #endif
  386. #ifndef ReadBps
  387. void ReadBps(char *str);
  388. #endif
  389. #ifndef  SetUpPort
  390. int  SetUpPort(int bps);
  391. #endif
  392. #ifndef BeNice
  393. void BeNice(int x);
  394. #endif
  395. #ifndef DialExternal
  396. int DialExternal(NetBuffer *netBuf);
  397. #endif
  398. #ifndef ChatEat
  399. char ChatEat(int c)
  400. #endif
  401. #ifndef ChatSend
  402. char ChatSend(int c)
  403. #endif
  404. #ifndef makeBanner
  405. void makeBanner(char *x, char *y, int z);
  406. #endif
  407. /*
  408. * 3.11 File Comments
  409. */
  410. #ifndef StFileComSearch
  411. int StFileComSearch(void);
  412. #endif
  413. #ifndef FindFileComment
  414. int FindFileComment(char *fn);
  415. #endif
  416. #ifndef EndFileComment
  417. void EndFileComment(void);
  418. #endif
  419. /*
  420. * 3.12 deARCing prototypes.
  421. */
  422. #ifndef ArcInit
  423. void ArcInit(void);
  424. #endif
  425. #ifndef SendArcFiles
  426. void SendArcFiles(int protocol);
  427. #endif
  428. #ifndef MakeTempDir
  429. void MakeTempDir(void);
  430. #endif
  431. #ifndef FileIntegrity
  432. char FileIntegrity(char *fileName);
  433. #endif
  434. #ifndef CompAvailable
  435. char CompAvailable(char CompType);
  436. #endif
  437. #ifndef DeCompAvailable
  438. char DeCompAvailable(char CompType);
  439. #endif
  440. #ifndef NetDeCompress
  441. void NetDeCompress(char CompType, SYS_FILE fn);
  442. #endif
  443. #ifndef MakeDeCompressedFilename
  444. void MakeDeCompressedFilename(SYS_FILE fn, char *FileName);
  445. #endif
  446. #ifndef KillNetDeCompress
  447. void KillNetDeCompress(void);
  448. #endif
  449. #ifndef Compress
  450. void Compress(char CompType, char *Files, char *ArcFileName);
  451. #endif
  452. #ifndef CompExtension
  453. char *CompExtension(char CompType);
  454. #endif
  455. #ifndef GetUserCompression
  456. int GetUserCompression(void);
  457. #endif
  458. #ifndef GetCompEnglish
  459. char *GetCompEnglish(char CompType);
  460. #endif
  461. #ifndef AnyCompression
  462. char AnyCompression(void);
  463. #endif
  464. /*
  465. * 3.13 External protocols
  466. */
  467. #ifndef ExternalProtocol
  468. int ExternalProtocol(int protocol, char up, char *name, char *phrase,
  469. char move);
  470. #endif
  471. #ifndef EatExtMessage
  472. int EatExtMessage(int uploading);
  473. #endif
  474. #ifndef FindProtoName
  475. char *FindProtoName(int protocol);
  476. #endif
  477. #ifndef AddExternProtocolOptions
  478. void AddExternProtocolOptions(char **Opts, char upload);
  479. #endif
  480. #ifndef FindProtocolCode
  481. int FindProtocolCode(int c, char upload);
  482. #endif
  483. #ifndef DoesNumerous
  484. char DoesNumerous(int protocol);
  485. #endif
  486. #ifndef UpProtsEnglish
  487. void UpProtsEnglish(char *target);
  488. #endif
  489. #ifndef DownProtsEnglish
  490. void DownProtsEnglish(char *target);
  491. #endif
  492. #ifndef LastOn
  493. char *LastOn(long lastdate, char shortstyle);
  494. #endif
  495. #ifndef ExternalTransfer
  496. char ExternalTransfer(int protocol, char *filename);
  497. #endif
  498. /*
  499. * Menu handling stuff
  500. */
  501. #ifndef RegisterSysopMenu
  502. MenuId RegisterSysopMenu(char *MenuName, char *Opts[], char *MenuTitle);
  503. #endif
  504. #ifndef GetSysopMenuChar
  505. int GetSysopMenuChar(MenuId id);
  506. #endif
  507. #ifndef CloseSysopMenu
  508. void CloseSysopMenu(MenuId id);
  509. #endif
  510. #ifndef SysopMenuPrompt
  511. void SysopMenuPrompt(MenuId id, char *prompt);
  512. #endif
  513. #ifndef SysopError
  514. void SysopError(MenuId id, char *prompt);
  515. #endif
  516. #ifndef SysopGetYesNo
  517. char SysopGetYesNo(MenuId id, char *info, char *prompt);
  518. #endif
  519. #ifndef SysopRequestString
  520. void SysopRequestString(MenuId id, char *prompt, char *buf, int size, int flags);
  521. #endif
  522. #ifndef SysopInfoReport
  523. void SysopInfoReport(MenuId id, char *info);
  524. #endif
  525. #ifndef SysopDisplayInfo
  526. void SysopDisplayInfo(MenuId id, char *info, char *title);
  527. #endif
  528. #ifndef SysopGetNumber
  529. long SysopGetNumber(MenuId id, char *prompt, long bottom, long top);
  530. #endif
  531. #ifndef SysopContinual
  532. MenuId SysopContinual(char *title, char *prompt, int Width, int Depth);
  533. #endif
  534. #ifndef SysopContinualString
  535. void SysopContinualString(MenuId id, char *prompt, char *buf, int size, int flags);
  536. #endif
  537. #ifndef SysopCloseContinual
  538. void SysopCloseContinual(MenuId id);
  539. #endif
  540. #ifndef SysopPrintf
  541. int  SysopPrintf(MenuId id, char *format, ...);
  542. #endif
  543. #ifndef NeedSysopInpPrompt
  544. char NeedSysopInpPrompt(void);
  545. #endif
  546. /*
  547. * Caching functions -- possibly temporary
  548. */
  549. #ifndef NetCacheName
  550. void NetCacheName(char *buf, int slot, char *name);
  551. #endif
  552. #ifndef MakeNetCacheName
  553. void MakeNetCacheName(char *buf, int slot);
  554. #endif
  555. #ifndef MakeNetCache
  556. void MakeNetCache(char *buf);
  557. #endif
  558. /*
  559. * Virtual rooms
  560. */
  561. #ifndef makeVASysName
  562. void makeVASysName(char *x, char *y);
  563. #endif
  564. #ifndef CreateVAName
  565. void CreateVAName(char *fn, int slot, char *dir, long num);
  566. #endif
  567. /*
  568. * These functions are in SysCfg.C.
  569. */
  570. #ifdef CONFIGURE
  571. #ifndef initSysSpec
  572. void initSysSpec(void);
  573. #endif
  574. #ifndef sysArgs
  575. char sysArgs(char *str);
  576. #endif
  577. #ifndef sysSpecs
  578. int sysSpecs(char *line, int offset, char *status, FILE *fd);
  579. #endif
  580. #ifndef SysDepIntegrity
  581. char SysDepIntegrity(int *offset);
  582. #endif
  583. #ifndef FinalSystemCheck
  584. int FinalSystemCheck(char OnlyParams);
  585. #endif
  586. #ifndef FindDoorSlot
  587. int FindDoorSlot(char *str);
  588. #endif
  589. #endif
  590. /*
  591. * These functions are in SysUtil.C.
  592. */
  593. #ifndef getUtilDate
  594. void getUtilDate(int *year, int *month, int *day, int *hours, int *minutes);
  595. #endif
  596. #include "sysprot.h"
  597. #else   /* !Ansiprototyping */
  598. FILE *safeopen();
  599. long CurAbsolute(),
  600. sysRoomLeft(),
  601. chkTimeSince();
  602. AN_UNSIGNED inp();
  603. char *prtNetArea();
  604. #ifdef SYSTEM_DEPENDENT
  605. int  nodie(),
  606. Control_C(),
  607. video(),
  608. statusline(),
  609. Zvideo(),
  610. Zsline(),
  611. Zreset_video(),
  612. AddName();
  613. char *gcdir(),
  614. AN_UNSIGNED interpret();
  615. long milliTimeSince(),
  616. timeSince(),
  617. dostounix();
  618. #ifdef CONFIGURE
  619. char *getcwd();
  620. #endif
  621. #endif
  622. #endif
  623.